$(document).ready(function(){
	$.ajaxSetup({
		complete: function(xhr,status) {
		    if(xhr.getResponseHeader("Connection") == 'close' || 
		    		(xhr.responseJSON && xhr.responseJSON.errorCode == "USER_NO_LOGIN")) {
		      $.messager.alert('提示','<p>会话已失效, 请重新登录！</p>', 'error', function(){
		    	  window.parent.location.href = '/UserLogin.html';
		      });
		    }
		}
	});
	
});

